package net.gz01.wallet.common;

import java.util.LinkedHashMap;
import java.util.Map;

public class LayuiRespon {
	
	private int code;
	private String msg = "操作成功";
	private Map<String, Object> data = new LinkedHashMap<>();
	
	public static LayuiRespon getTimeOut() {
		LayuiRespon rsp = new LayuiRespon();
		rsp.setMsg("登录超时,请重新登录");
		rsp.setCode(301);
		return rsp;
	}
	
	public static LayuiRespon getException() {
		LayuiRespon rsp = new LayuiRespon();
		rsp.setCode(300);
		rsp.setMsg("系统错误,请稍后再试");
		return rsp;
	}
	
	public static LayuiRespon getSuccess() {
		LayuiRespon rsp = new LayuiRespon();
		rsp.setCode(0);
		return rsp;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int statusCode) {
		this.code = statusCode;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Map<String, Object> getData() {
		return data;
	}

	public void setData(Map<String, Object> data) {
		this.data = data;
	}

}
